package dict

type Consumer func(key string, val interface{})bool

type Dict interface {
    Get(key string) (val interface{}, exists bool)
    Len() int
    Put(key string, val interface{}) (result int)
    PutIfAbsent(key string, val interface{}) (result int)
    PutIfExists(key string, val interface{}) (result int)
    Remove(key string) (result int)
    ForEach(consumer Consumer)
    Keys() []string
    RandomKeys(limit int) []string
    RandomDistinctKeys(limit int) []string
}
